From: kaf24@firebug.cl.cam.ac.uk Date: Thu, 29 Sep 2005 15:39:32 +0000 (+0100) Subject: Slight rejig avoids grant entry warning message on xm save. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16769^2~8 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=c43f604d052899424af23cdb3cba83f5546ea5ae;p=xen.git Slight rejig avoids grant entry warning message on xm save. Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index 82097a4abf..78222c92f5 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -683,8 +683,6 @@ static int blkfront_suspend(struct xenbus_device *dev) kfree(info->backend); info->backend = NULL; - blkif_free(info); - return 0; } @@ -693,11 +691,12 @@ static int blkfront_resume(struct xenbus_device *dev) struct blkfront_info *info = dev->data; int err; - /* FIXME: Check geometry hasn't changed here... */ + blkif_free(info); + err = talk_to_backend(dev, info); - if (!err) { + if (!err) blkif_recover(info); - } + return err; } diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index 132f0026f4..5a5dac453f 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -1247,24 +1247,17 @@ static int netfront_remove(struct xenbus_device *dev) static int netfront_suspend(struct xenbus_device *dev) { struct netfront_info *info = dev->data; - unregister_xenbus_watch(&info->watch); kfree(info->backend); info->backend = NULL; - - netif_free(info); - return 0; } static int netfront_resume(struct xenbus_device *dev) { - struct net_private *np = dev->data; - int err; - - err = talk_to_backend(dev, np); - - return err; + struct netfront_info *info = dev->data; + netif_free(info); + return talk_to_backend(dev, info); } static struct xenbus_driver netfront = {